UC Parks

/!\ Disclaimer: this work is based and use our own Python package geodecision We present our library in this use case:

  • how to use different modules
  • how to combine them
  • which data to use

We plot our examples with matplotlib to get valid static outputs. For our dynamic and interactiv dashboard, we will create a Bokeh application

What we want to do

We want to create decision-making dashboard tools on the UC Parks (Use Case Parks) Briefly, we want to:

  • determine buildings and urban areas located within a 10 minutes walkable range around park and those that are out this accessible area:
    • we need to get parks (as geolocated polygons or multipolygons) on our study area
    • we need a graph from the network
    • build accessibility measure tools (in Python)
  • get "flat roofs" of our study area:
    • get CityGML files & parse them to gather informations and make measures
    • select roof with a "potential"
  • get information from:
    • socio-economic data
    • real estate costs
    • ...

We do this on the following study areas:

  • Lyon (France)
  • Villeurbanne (France)

Parks

Get parks from a bounding box and a key/value query. Data come from OpenStreetMap.

OSM Tile Calculator from Geofabrik can be used to get the bounding box coordinates.

Bounding box arguments must be a tuple of coordinates in EPSG 4326 => (SOUTH, WEST, NORTH, EAST).

The function will return a GeoJSON features collection.

These features can be:

  • transformed into a GeoPandas DataFrame
  • written into a GeoJSON file in order to be available locally
  • be plotted to visually check our request
  • check the DataFrame
In [5]:
parks.plot(color="green")
Out[5]:
<matplotlib.axes._subplots.AxesSubplot at 0x7f30d5a964e0>

Measure accessibility to parks

Get a graph

Get the street network ...

... & transform it to graph

Connect parks to the network

In order to measure accessibility to parks, we need to connect them to the street network (which has been transformed into a graph).

First, a brief history of our multiple approaches' attempts and their limits.

Here is a brief history of our reflexions and methodolical approaches to connect the parks to the street network.

Name Illustration Details & Limits Status
V1 Slow (lot of spatial requests), arbitrary buffer size, problematic with very long edges Rejected
Name Illustration Details & Limits Status
V2 Generates a lot of points, must be adapted regarding the size of the park Rejected
Name Illustration Details & Limits Status
V3 Better than the previous solution but may generate unnecessary nodes and edges Rejected
Name Illustration Details & Limits Status
V4 Demands a more complicated implementation but is more efficient and precise Adopted

Illustration

isolines

Roofs potential

Roofs data come from CityGML data, because we can't find this kind of data in the OSM data.

We can apply our Python functions to get roofs and measure:

  • slopes,
  • compactness,
  • minimal width

We parse the local directory with GML files and create GeoJSON files and one GeoJSON file that is a merge of all GeoJSON files.

We also try to get available denomination of buildings.

Get CityGML

Data can be found on Grand Lyon open data

Parse GML files, get roofs and buildings

Write results and measure % of valid attributes

  • Write results and concatenated files (for roofs and for buildings)
  • Measure the % of valid attributes
In [85]:
print (valid_attr)
                Length of Buildings DataFrame: 32286 elements
                Number of valid attributes:    667
                % of valid attributes:         2 %
                

/!\ Poor information on buildings attributes. Need to try to find information elsewhere

Plot roofs: find all roofs with potential

We can filter and select roofs to get only roofs with potential for the development of park.

Such a roof requires:

  • a minimum width
  • a minimum area
  • a maximum slope
  • a certain compactness (TODO: THIS POINT NEEDS TO BE DOCUMENTED)

We discrimises with (we need to work on these points to justify our choices):

parameter value
minimum width (meters) 10
minimum compactness 0.7
minimum area (m²) 100
maximum slope (angle) 30
In [84]:
print(roofs_potential)
                    Number of roofs with potential     =>  15512
                    Total number of roofs (study area) =>  330945
                    % of roofs with potential          =>  5
                    Total roofs area (m²)              =>  15725334.177007195
                    Roofs area with potential (m²)     =>  5717577.128122902
                    % of potential roofs area          =>  36.0
                    
In [95]:
ax = roofs.plot(color="white", label="Roofs",figsize=(10,10))
ax.set_facecolor("black")
selection.plot(color="green", label="Potential roofs", ax=ax)
iso_10_mn = gpd.read_file("./data/iso_cut.gpkg", layer="iso_10", driver="GPKG")
iso_10_mn_3946 = iso_10_mn.to_crs(epsg=3946)
iso_10_mn_3946.plot(ax=ax, color="white", alpha=0.4)
plt.plot()
/home/thomas/anaconda3/envs/space/lib/python3.7/site-packages/pyproj/crs.py:77: FutureWarning: '+init=<authority>:<code>' syntax is deprecated. '<authority>:<code>' is the preferred initialization method.
  return _prepare_from_string(" ".join(pjargs))
Out[95]:
[]

Urban analysis: buildings

We get the buildings from OpenStreetMap by using the osmnx Python library.

Data need to be cleaned (get rid of non-valid/empty geometries)

Once this done, we will use the analyse's capabilities of the momepy Python library.

For a first analyse, we will use the momepy examples section

Get buildings

Prepare data

/!\ Next operations with momepy will take time regarding the number of buildings.:

=> Read tessellation part in momepy user guide to know how to set parameters and balance precision/memory usage

Preprocess buildings

Make tessellation

/!\ WARNING: WE ADD A TRY/EXCEPT in momepy.distribution.py at line 553 in NeighborDistance to avoid errors on MultiPolygons

Analysis

Distance to neighbours

"To calculate the mean distance to neighbouring buildings, we need queen contiguity weights of the first order capturing the relationship between immediate neighbours. Relationship between buildings is here represented by relationships between their tessellation cells" momepy weights examples

In [102]:
import matplotlib.pyplot as plt
bldgs = bldgs.dropna(subset=["neighbour_dist"])
f, ax = plt.subplots(figsize=(10, 10))
bldgs.plot(ax=ax, column='neighbour_dist', scheme='quantiles', legend=True, cmap='magma_r')
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.3, legend=True)
ax.set_facecolor("black")
In [72]:
print(string)
print(string_)
         Total number of buildings                                   =>  60020
         
          % of buildings with a neighbour distance  0m <= x < 5m      =>  13 %
          
          % of buildings with a neighbour distance  5m <= x < 10m      =>  21 %
          
          % of buildings with a neighbour distance  10m <= x < 15m      =>  17 %
          
          % of buildings with a neighbour distance  15m <= x < 20m      =>  11 %
          
          % of buildings with a neighbour distance  20m <= x < 25m      =>  7 %
          
          % of buildings with a neighbour distance  25m <= x < 30m      =>  5 %
          
          % of buildings with a neighbour distance  30m <= x < 35m      =>  3 %
          
          % of buildings with a neighbour distance  35m <= x < 40m      =>  2 %
          
          % of buildings with a neighbour distance  40m <= x < 45m      =>  2 %
          
          % of buildings with a neighbour distance  45m <= x < 50m      =>  1 %
          

          Total of classified  => 84 %
          Remaining            => 15 %
          
In [105]:
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='gross_coverage', legend=True)
bldgs.plot(ax=ax, color='white', alpha=.5)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.3, legend=True)
ax.set_facecolor("black")

Get the street network as a graph

In [112]:
f, ax = plt.subplots(figsize=(10, 10))
edges.plot(ax=ax, linewidth=0.3, color="blue")
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()

Local closeness centrality

In [116]:
closeness400 = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
closeness400.plot(ax=ax, column='closeness400', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('closeness400')
plt.show()

Edge-based betweenness

In [ ]:
betweenness = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
betweenness.plot(ax=ax, column='betweenness_metric_e', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('betweenness centrality')
plt.show()

Straightness

In [ ]:
straightness = momepy.nx_to_gdf(primal, points=False)
f, ax = plt.subplots(figsize=(10, 10))
straightness.plot(ax=ax, column='straightness', cmap='plasma', scheme='quantiles', k=10, alpha=0.6)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
ax.set_title('straightness')
plt.show()

Urban analysis: inequality

We use osmnx and momepy diversity.

Theil index

"The Theil index is a statistic primarily used to measure economic inequality and other economic phenomena, though it has also been used to measure racial segregation" (Wikipedia)

In [211]:
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='area_Theil_ID', scheme='fisherjenkssampled', k=10, legend=True, cmap='plasma')
bldgs.plot(ax=ax, color="white", alpha=0.4)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()
/home/thomas/anaconda3/envs/space/lib/python3.7/site-packages/mapclassify/classifiers.py:482: UserWarning: Deprecated (2.1.0): Fisher_Jenks is being renamed to FisherJenks. Fisher_Jenks will be removed on 2020-01-31.
  warn(self.message)

Simpson's diversity index

"The Simpson index was introduced in 1949 by Edward H. Simpson to measure the degree of concentration when individuals are classified into types" (Wikipedia)

In [ ]:
f, ax = plt.subplots(figsize=(10, 10))
tessellation.plot(ax=ax, column='area_simpson', legend=True, cmap='viridis')
bldgs.plot(ax=ax, color="white", alpha=0.4)
iso_10_mn_32631.plot(ax=ax, color="white", alpha=0.4, legend=True)
ax.set_facecolor("black")
plt.show()

Social & economic analysis

INSEE 1km & 200m gridded data

Information

Name Provider License & terms of use Warnings Documentation Variables
Gridded data (1km) FiLoSoFi INSEE Link INSEE Warnings (fr) Link Dictionary of variables
Gridded data (200m) FiLoSoFi INSEE Link INSEE Warnings (fr) Link Dictionary of variables

Variables

Field Details
IdINSPIRE Identifiant Inspire du carreau de 200 m
I_est_cr Vaut 1 si le carreau de 200 m est imputé par une valeur approchée, 0 sinon
Id_carr_n Identifiant Inspire du carreau de niveau naturel auquel appartient le carreau de 200 m
Groupe Numéro du groupe auquel appartient le carreau (voir documentation)
Depcom Code commune, selon le code officiel géographique 2019, auquel sont rattachés la majorité des ménages du carreau
Id_car2010 Identifiant Inspire du carreau de 200 m figurant dans la base de données carroyées à 200 m diffusée avec la source RFL2010 (le nombre de caractères peut être différent de celui de IdINSPIRE)
Id_carr1km Identifiant Inspire du carreau de 1 km auquel appartient le carreau de 200 m
I_pauv Nombre de carreaux de 200 m compris dans le carreau de 1 km qui ont été traités pour respecter la confidentialité sur le nombre de ménages pauvres
I_est_1km Vaut 1 si le carreau est imputé par une valeur approchée, 0 ou 2 sinon
Ind Nombre d’individus
Men Nombre de ménages
Men_pauv Nombre de ménages pauvres
Men_1ind Nombre de ménages d’un seul individu
Men_5ind Nombre de ménages de 5 individus ou plus
Men_prop Nombre de ménages propriétaires
Men_fmp Nombre de ménages monoparentaux
Ind_snv Somme des niveaux de vie winsorisés des individus
Men_surf Somme de la surface des logements du carreau
Men_coll Nombre de ménages en logements collectifs
Men_mais Nombre de ménages en maison
Log_av45 Nombre de logements construits avant 1945
Log_45_70 Nombre de logements construits entre 1945 et 1969
Log_70_90 Nombre de logements construits entre 1970 et 1989
Log_ap90 Nombre de logements construits depuis 1990
Log_inc Nombre de logements dont la date de construction est inconnue
Log_soc Nombre de logements sociaux
Ind_0_3 Nombre d’individus de 0 à 3 ans
Ind_4_5 Nombre d’individus de 4 à 5 ans
Ind_6_10 Nombre d’individus de 6 à 10 ans
Ind_11_17 Nombre d’individus de 11 à 17 ans
Ind_18_24 Nombre d’individus de 18 à 24 ans
Ind_25_39 Nombre d’individus de 25 à 39 ans
Ind_40_54 Nombre d’individus de 40 à 54 ans
Ind_55_64 Nombre d’individus de 55 à 64 ans
Ind_65_79 Nombre d’individus de 65 à 79 ans
Ind_80p Nombre d’individus de 80 ans ou plus
Ind_inc Nombre d’individus dont l’âge est inconnu

Get the grid for our study area

With QGIS, we select the part of the gridded data corresponding to our study area and save it as GeoJSON (to be easily readable by GeoPandas - we'll see this later).

Then we can use it as a GeoDataFrame.

Make classification

We have developed a module classification based on the mapclassify from Pysal.

This module allows to measure and determine the best classification and make classes for our data.

This module requires a JSON parameters file as input (with the structure illustrated below)

[{
                "name": "name of the futur GeoDataFrame A",
                "filepath": "path/to/GeoJSON file",
                "variables": {
                    "variable 1": {
                        "classification": boolean (if true, make classification, else set to false),
                        "description": "Short description of the var"
                    },
                    "variable 2": {
                        "classification": boolean (if true, make classification, else set to false),
                        "description": "Short description of the var"
                    },
                    "variable 3": {
                        "classification": boolean (if true, make classification, else set to false),
                        "description": "Short description of the var"
                    }
                },
                {
                    "name": "name of the futur GeoDataFrame A",
                    "filepath": "path/to/GeoJSON file",
                    "variables": {
                        "variable 1": {
                            "classification": boolean (if true, make classification, else set to false),
                            "description": "Short description of the var"
                        },
                        "variable 2": {
                            "classification": boolean (if true, make classification, else set to false),
                            "description": "Short description of the var"
                        },
                        "variable 3": {
                            "classification": boolean (if true, make classification, else set to false),
                            "description": "Short description of the var"
                        }
                    }
                }
            ]
In [55]:
serie = "Ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [56]:
serie = "Men"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [57]:
serie = "Men_pauv"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [58]:
serie = "Men_1ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [59]:
serie = "Men_5ind"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [60]:
serie = "Men_prop"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [61]:
serie = "Ind_snv"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [62]:
serie = "Men_coll"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [63]:
serie = "Men_mais"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [64]:
serie = "Log_av45"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [65]:
serie = "Log_45_70"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [66]:
serie = "Log_70_90"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [67]:
serie = "Log_ap90"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [68]:
serie = "Log_soc"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [69]:
serie = "Ind_0_3"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [70]:
serie = "Ind_4_5"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [71]:
serie = "Ind_6_10"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [72]:
serie = "Ind_11_17"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [73]:
serie = "Ind_18_24"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [74]:
serie = "Ind_25_39"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [75]:
serie = "Ind_40_54"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [76]:
serie = "Ind_55_64"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [77]:
serie = "Ind_65_79"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()
In [78]:
serie = "Ind_80p"
scheme, k = classification[serie]["best"]["all"].name, classification[serie]["best"]["all"].k
f, ax = plt.subplots(figsize=(10, 10))
gridded_data_INSEE_200.plot(ax=ax, column=serie, scheme=scheme, k=k, legend=True, cmap='plasma')
iso_10_mn.plot(ax=ax, color="white", alpha=0.5)
ax.set_facecolor("black")
ax.set_title(variables[serie]["description"].upper()+" ["+scheme+", k: "+str(k)+"]")
plt.show()